home *** CD-ROM | disk | FTP | other *** search
- #
- # Annex terminal login script.
- #
- # Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- # Modified: Craig Graham, <craig.graham@newcastle.ac.uk>
- #
-
- main:
- print DIP Script for Newcastle University.
- print (C)Craig Graham,30/1/95.
-
- # First of all, set up our name for this connection.
- # I am called "falcon.newcastle.ac.uk"
- get $local falcon.newcastle.ac.uk
-
- # Next, set up the other side's name and address.
- # My dialin machine is called 'knott.newcastle.ac.uk' (== 128.240.2.11)
- get $remote knott
-
- # Set netmask on sl0 to 255.255.255.0
- netmask 255.255.255.0
-
- # Set the desired serial port and speed.
- # I've got a real slow modem :(
- port ttyb
- speed 2400
-
- # Reset the modem and terminal line.
- # This seems to cause trouble for some people!
- reset
-
- # Prepare for dialing.
- send ATQ0V1E1X4\r
- wait OK 2
- if $errlvl != 0 goto modem_trouble
- print Dialing...
- dial 2226455
- if $errlvl != 0 goto modem_trouble
- wait CONNECT 30
- if $errlvl != 0 goto no_connect
- print ...connected.
-
- # We are connected. Login to the system.
- login:
- sleep 2
- wait knott: 20
- print Requesting a CSLIP connection...
- send slip\n
- wait Username: 20
- if $errlvl != 0 goto login_error
- send n08z7\n
- wait Password: 20
- if $errlvl != 0 goto password_error
- #send a password here
- send my_password\n
- loggedin:
-
- # Set the remote IP address (this may have already been done,
- # but just to be sure).
- get $rmtip 128.240.2.11
-
- # Get the allocated local IP address from the Annex.
- wait Your 20
- wait is 15
- get $locip remote
-
- if $errlvl != 0 goto prompt_error
-
- # Set up the SLIP operating parameters.
- get $mtu 296
-
- # Ensure "route add -net default knott.newcastle.ac.uk" will be done
- default
-
- # Say hello and switch to SLIP mode.
- done:
- print CONNECTED $locip ---> $rmtip
- mode CSLIP
- goto exit
-
- prompt_error:
- print TIME-OUT waiting for SLIPlogin to fire up...
- goto error
-
- login_trouble:
- print Trouble waiting for the Login: prompt...
- goto error
-
- password:error:
- print Trouble waiting for the Password: prompt...
- goto error
-
- no_connect:
- print Cann't connect to remote host...
- goto error
-
- modem_trouble:
- print Trouble ocurred with the modem...
- error:
- print CONNECT FAILED to $remote
- quit
-
- exit:
- exit
-